﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YBApproval.Model;

namespace YBApproval.IDAL
{
    public interface IInstance : IDisposable
    {
        Instance GetInstance(string recordId);

        void Add(Instance instance, List<InstanceValue> values, List<InstanceApproval> approvals);

        void Add(Instance instance, List<InstanceValue> values);


        void Update(Instance instance, List<InstanceValue> values, List<InstanceApproval> approvals, List<InstanceApproval> oldApprovals);

        void Update(Instance instance);

        void Update(Instance instance, InstanceApproval instApproval, List<InstanceApproval> approvals);

        void Update(Instance instance, InstanceApproval instApproval);

        void Update(Instance instance, List<InstanceValue> values);

        void Delete(string recordId);
    }
}
